package com.example.xyr.myapplication.ui.im;

import android.widget.ImageView;

import com.example.xyr.myapplication.myinterface.MyUserAvatar;
import com.jrmf360.tools.interfaces.IUserAvatar;

/**
 * Created by ylcf on 2018/8/2.
 */

public class RpUserAvatar implements IUserAvatar {

    private static MyUserAvatar avatar;
    private static RpUserAvatar rpUserAvatar;

    public static RpUserAvatar getInstent() {
        if (rpUserAvatar == null) {
            rpUserAvatar = new RpUserAvatar();
        }
        return rpUserAvatar;
    }

    private RpUserAvatar() {

    }

    public void setMyUserAvatar(MyUserAvatar myUserAvatar) {
        avatar = myUserAvatar;
    }

    @Override
    public void getAvatarIv(ImageView imageView) {
        if (avatar != null) {
            avatar.setAvatar(imageView);
        }
    }

}
